@using Test.Models;
@model IEnumerable<Commodity>;
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>电子商城</title>
</head>
<style>
    table,
    th,
    td {
        border: 1px solid;
        border-spacing: 0px;
    }
    .add{
        margin-left: 150px;
    }

</style>

<body>
    <div><input type="text" name="keyword" placeholder="请输入关键字"><input type="button" value="查找" onclick="find()">
        <input type="button" class="add" value="增加" onclick="add()">
    </div>
    <table id="tbData">
        <tr>
            <th>Id</th>
            <th>商品名称</th>
            <th>供应商名称</th>
            <th>价格</th>
            <th>库存数量</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
        @foreach (var item in Model)
        {
            <tr class="tbRow">
                <td>@item.ID</td>
                <td>@item.ProductName</td>
                <td>@item.Supplier</td>
                <td>@item.Price</td>
                <td>@item.Stock</td>
                <td>@item.Remarks</td>
                <td>
                    <input type="button" value="编辑" onclick="btnEdit(@item.ID)">
                    <input type="button" value="删除" onclick="btnDel(@item.ID)">
                </td>
            </tr>
        }
    </table>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script src="~/js/base.js"></script>
</body>
